
<style>
    @media ( min-width: 992px) {
        .modal-blg {
            width: 95%;
        }
    }
</style>
<div class="modal-content">
    <div class="modal-header">
        <button class="close" ng-click="cancel()" type="button">
            <span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
        </button>
        <h4 class="modal-title">采购信息</h4>
    </div>
    <div class="modal-body">
        <div class="wrapper wrapper-content animated fadeInRight">
            <form action="" class="form-horizontal m-t-md " name="myForm" novalidate>
                <div class="form-group">
                    <label class="col-sm-2 control-label"><span
                            class="text-danger">*</span>标题:</label>
                    <div class="col-sm-10">
                        <input  ng-disabled="pagetype=='select'" class="form-control ng-pristine ng-untouched ng-valid ng-empty" name="name"
                               ng-maxlength="500"
                               ng-model="item.name"
                               placeholder="请输入标题" required type="text">
                        <div class="text-danger"
                             ng-if="myForm.name.$dirty && myForm.name.$invalid">
                            <span ng-if="myForm.name.$error.required"> 输入不能为空 </span> <span
                                ng-show="myForm.name.$error.maxlength">不能超过500个字符 </span>
                        </div>
                    </div>
                </div>


                <div class="form-group">
                    <label class="col-sm-2 control-label"><span
                            class="text-danger">*</span>资产名称:</label>
                    <div class="col-sm-10">
                        <input ng-disabled="pagetype=='select'" class="form-control ng-pristine ng-untouched ng-valid ng-empty" name="zcname"
                               ng-maxlength="500"
                               ng-model="item.zcname"
                               placeholder="请输入资产名称" required type="text">
                        <div class="text-danger"
                             ng-if="myForm.zcname.$dirty && myForm.zcname.$invalid">
                            <span ng-if="myForm.zcname.$error.required"> 输入不能为空 </span> <span
                                ng-show="myForm.zcname.$error.maxlength">不能超过500个字符 </span>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label"><span
                            class="text-danger">*</span>规格型号:</label>
                    <div class="col-sm-10">
                        <input ng-disabled="pagetype=='select'" class="form-control ng-pristine ng-untouched ng-valid ng-empty" name="zcmodel"
                               ng-maxlength="500"
                               ng-model="item.zcmodel"
                               placeholder="请输入规格型号" required type="text">
                        <div class="text-danger"
                             ng-if="myForm.zcmodel.$dirty && myForm.zcmodel.$invalid">
                            <span ng-if="myForm.zcmodel.$error.required"> 输入不能为空 </span> <span
                                ng-show="myForm.zcmodel.$error.maxlength">不能超过500个字符 </span>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label"><span
                            class="text-danger">*</span>单位:</label>
                    <div class="col-sm-10">
                        <input ng-disabled="pagetype=='select'" class="form-control ng-pristine ng-untouched ng-valid ng-empty" name="unit"
                               ng-maxlength="500"
                               ng-model="item.unit"
                               placeholder="请输入单位" required type="text">
                        <div class="text-danger"
                             ng-if="myForm.unit.$dirty && myForm.unit.$invalid">
                            <span ng-if="myForm.unit.$error.required"> 输入不能为空 </span> <span
                                ng-show="myForm.unit.$error.maxlength">不能超过500个字符 </span>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label"><span
                            class="text-danger">*</span>数量:</label>
                    <div class="col-sm-10">
                        <input ng-disabled="pagetype=='select'" class="form-control ng-pristine ng-untouched ng-valid ng-empty" name="cnt"
                               ng-maxlength="500"
                               ng-model="item.cnt"
                               placeholder="请输入数量" required type="text">
                        <div class="text-danger"
                             ng-if="myForm.cnt.$dirty && myForm.cnt.$invalid">
                            <span ng-if="myForm.cnt.$error.required"> 输入不能为空 </span> <span
                                ng-show="myForm.cnt.$error.maxlength">不能超过500个字符 </span>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label"><span
                            class="text-danger">*</span>预计单价:</label>
                    <div class="col-sm-10">
                        <input ng-disabled="pagetype=='select'" class="form-control ng-pristine ng-untouched ng-valid ng-empty" name="estprice"
                               ng-maxlength="500"
                               ng-model="item.estprice"
                               placeholder="请输入单价" required type="text">
                        <div class="text-danger"
                             ng-if="myForm.estprice.$dirty && myForm.estprice.$invalid">
                            <span ng-if="myForm.estprice.$error.required"> 输入不能为空 </span> <span
                                ng-show="myForm.estprice.$error.maxlength">不能超过500个字符 </span>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label"><span
                            class="text-danger">*</span>合同金额:</label>
                    <div class="col-sm-10">
                        <input ng-disabled="pagetype=='select'" class="form-control ng-pristine ng-untouched ng-valid ng-empty" name="contractamount"
                               ng-maxlength="500"
                               ng-model="item.contractamount"
                               placeholder="请输入合同金额" required type="text">
                        <div class="text-danger"
                             ng-if="myForm.contractamount.$dirty && myForm.contractamount.$invalid">
                            <span ng-if="myForm.contractamount.$error.required"> 输入不能为空 </span> <span
                                ng-show="myForm.contractamount.$error.maxlength">不能超过500个字符 </span>
                        </div>
                    </div>
                </div>



                <div class="form-group">
                    <label class="col-sm-2 control-label"><span
                            class="text-danger">*</span>计划情况:</label>
                    <div class="col-sm-10">
                        <select ng-disabled="pagetype=='select'" chosen class="chosen-select"
                                data-placeholder-text-single="'请选择...'" disable-search="true"
                                ng-model="planSel" ng-options="item.name for item in planOpt"
                                no-results-text="'没有找到相应条目'">
                            <option value=""></option>
                        </select>
                    </div>
                </div>

                <div class="form-group" ng-show="planSel.id=='outside'">
                    <label class="col-sm-2 control-label">附件文件:</label>
                    <div class="col-sm-10">
                        <div ng-hide="pagetype=='select'" class="dropzone" drop-zone dzconfig="dzconfig"
                             dzeventHandlers="dtldzevent" enctype="multipart/form-data">
                            <div class="fallback" id="dropzone">
                                <input multiple="" name="file" type="file"/>
                            </div>
                        </div>
                        <div ng-show="pagetype=='select'">
                            <span ng-show="item.files"><a href="../api/file/filedown.do?id={{item.files}}">附件下载</a></span>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">用途:</label>
                    <div class="col-sm-10">
                        <input ng-disabled="pagetype=='select'" class="form-control ng-pristine ng-untouched ng-valid ng-empty"
                               ng-model="item.purpose"
                               placeholder="请输入用途" type="text">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">备注:</label>
                    <div class="col-sm-10">
                        <input ng-disabled="pagetype=='select'" class="form-control ng-pristine ng-untouched ng-valid ng-empty"
                               ng-model="item.mark"
                               placeholder="请输入备注" type="text">
                    </div>
                </div>
            </form>
        </div>

        <div ng-include="'views/cmdb/flow/flow_part_suggest.html'"></div>
       <div ng-include="'views/cmdb/flow/flow_part_approval.html'"></div>
    </div>
    <div class="modal-footer" style="text-align: center" ng-hide="pagetype=='select'">
        <button class="btn btn-warning" ng-click="cancel()">取消</button>
        <button class="btn btn-primary" ng-click="sure()"
                ng-disabled="myForm.$invalid">确认
        </button>
    </div>
</div>